var sentence = 'good afternoon, mr mike.';
function firstToUpper3(str){
    return str.toLowerCase().replace(/( |^)[a-z]/g,(L)=>L.toUpperCase());
}
document.write(firstToUpper3(sentence))
var d = 10/+0;  var g = 10/-0;  var l = 10/'a';
alert(typeof (d))
alert(typeof (g))
alert(typeof (l))